package com.aifast.core.dataScope;

import com.aifast.common.dataScope.DataScope;

/**
 * @Author fujian
 * @since 2022/5/20 9:47
 * 上下文 数据权限中连接aop和mp的拦截器的桥梁
 */
public abstract class DataScopeContextHolder {

    private static final ThreadLocal<DataScope> context = new InheritableThreadLocal<>();

    public static DataScope get() {
        return context.get();
    }

    public static void set(DataScope dataScope) {
        context.set(dataScope);
    }

    public static void remove() {
        context.remove();
    }


}
